#version 330 core

layout(location = 0) in vec4 aPos;
layout(location = 1) in vec4 aColor;
layout(location = 2) in mat4 modelMatrix; // 2 3 4 5

uniform mat4 view_matrix;
uniform mat4 projection_matrix;

out VERTEX
{
    vec3 normal;
    vec4 color;
} vertex;

void main()
{
    mat4 model_view_matrix = view_matrix * modelMatrix;
//    gl_Position = projection_matrix * (model_view_matrix * aPos);
    gl_Position = projection_matrix * (view_matrix * aPos);
    vertex.color = aColor;
}

